﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace GxTsSharp.Models
{
    [StructLayout(LayoutKind.Sequential)]
    public class StockReport
    {
        /// <summary>
        /// 编号
        /// </summary>
        public ushort No;

        /// <summary>
        /// 变化序列号
        /// </summary>
        public ushort SerialNo;

        /// <summary>
        /// 现在时间 例如150000
        /// </summary>
        public uint Time;

        public Report Report;
    }

    [StructLayout(LayoutKind.Sequential)]
    public class Report
    {
        public float ZTPrice;
        public float DTPrice;
        public float PrevClose;
        public float OpenPrice;
        public float MaxPrice;
        public float MinPrice;
        public float NewPrice;
        public float Total;
        public float Money;

        public uint Stroke;

        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] public float[] BuyPrice;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] public float[] BuyCount;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] public float[] SellPrice;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] public float[] SellCount;

        public float OpenInterest;
        public float PreOpenInterest;
        public float PreSettlePrice;
        public float SettlePrice;

        public float BuyTotal;
        public float Current;
        public float MinuteRise1;
        public float MinuteRise3;
        public float MinuteRise5;
    }
}
